/**
 * @Author: 陈瑞鹏
 * @Date:   2022-12-14 09:22:17
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2022-12-14 10:37:56
 */
import mongoose from "mongoose";

const Schema = mongoose.Schema;
const TreasureSchema: mongoose.Schema = new Schema({
  roleId: { type: Number, display: "角色id", index: true },
  treasureId: { type: Number, display: "宝箱id" },
  step: { type: Number, display: "开启步骤 1未开启 2 开启中 3开启完成可以点击获取奖励 4 宝箱已经被领取", default: 1 },
  openTime: { type: String, display: "开启时间，时间戳" },
  updateTime: { type: String, display: '更新时间' },
  createTime: { type: String, display: '创建时间' },
}).index({ roleId: 1 });

const Treasure = mongoose.model('Treasure', TreasureSchema);
export default Treasure;